using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace eCloudEdit
{
    public partial class StartPageForm : Form
    {
        private string _PageName = "";
        public StartPageForm()
        {
            InitializeComponent();
        }
        public void AddPageNames(string sp)
        {
           // comboBox1.Items.Clear();
            comboBox1.Items.Add(sp);
        }
        public string GetSelectPageName
        {
            get
            {
                return _PageName;
            }
            set
            {
                _PageName = value;
                //this.comboBox1.SelectedText = _FirstForm;
                int n = this.comboBox1.Items.Count;
                for (int i = 0; i < n; i++)
                {
                    if (this.comboBox1.Items[i].Equals(_PageName))
                    {
                        this.comboBox1.SelectedItem = this.comboBox1.Items[i];
                        break;
                    }
                }
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int n = this.comboBox1.SelectedIndex;
            if (n >= 0)
            {
                _PageName = this.comboBox1.GetItemText(this.comboBox1.SelectedItem);
            }
        }
       
    }
}